package io.github.eric.urpc.standalone.common;

public enum MessageStatus {
    SEND_FAILED(-1, "消息发送失败，用户不在线或找不到该用户"),
    SEND_SUCCEED(0, "消息发送成功，待对方接收"),
    RECV_COMPLETED(1, "消息接收成功")
    ;
    private int code;
    private String msg;

    MessageStatus(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    @Override
    public String toString() {
        return "[" + code + "|" + msg + "]";
    }
}

